#ifndef _MOD_ISR_HEADER_
#define _MOD_ISR_HEADER_

#define	EnableIrq(bit)		rINTMSK &= ~(bit)
#define	DisableIrq(bit)		rINTMSK |= (bit)
#define	EnableSubIrq(bit)	rINTSUBMSK &= ~(bit)
#define	DisableSubIrq(bit)	rINTSUBMSK |= (bit)

#define   IsIrqEnabled(bit)		((rINTMSK&(bit))==0)
#define   IsSubIrqEnabled(bit)		((rINTSUBMSK&(bit))==0)


#define ISRPending(bit)		(rINTPND&(bit))
#define ISRSubPending(bit)	(rSUBSRCPND&(bit))

#define ClearPending(bit)		{volatile register int x;rSRCPND=bit;rINTPND=bit;x=rINTPND;}
#define ClearSubPending(bit)	{volatile register int x;rSUBSRCPND=bit;x=rINTPND;}

#define TIMER0_PRESC_VAL		15


void SetupISR(void);

void Timer0_ISR(void);
void Timer0Init(void);
void ISRInit(void);
void SetupTimerAndISR(void);

#endif
